{% extends "GairalAdminBundle::boLayout.html.twig" %}

{% block js %}
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?v=3.12&amp;sensor=true" id="mapsApi"></script>
{% javascripts '@fkMap' %}
<script src="{{ asset_url }}" type="text/javascript"></script>
{% endjavascripts %}
{% endblock %}

{% block bodyAdmin %}

<script type="application/javascript">
    Fk.bind('load', function(){
    Fk.map.init({{ form.vars.value.lat }}, {{ form.vars.value.lon }});
    Fk.map.initSelectCoordOnMap('{{ form.lat.vars.id }}', '{{ form.lon.vars.id }}');
    });
</script>
<section id="adminTravelModify" class="content">
    <h1>Edit Travel</h1>
    <form method="post" {{ form_enctype(form) }} class="well">
        {{ form_widget(form) }}
            <div id="map_canvas" style="height:250px;"></div>
            <div class="btn-toolbar">
                <a href="{{ path('AdminTravel') }}" class="btn btn-info" title="Cancel">
                    <i class="icon-white icon-chevron-left"></i>
                    Cancel
                </a>
                <input type="submit" class="btn btn-primary" value="Save" />
            </div>
        </form>
    </section>
{% endblock %}